package com.xfcy.blog.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xfcy.blog.common.constant.DateConstant;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 在线人数和人数信息返回给后台的VO
 * @author 晓风残月Lx
 * @date 2023/4/21 11:49
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class LoginUserVO {

    private String loginId;
    private Long userId;
    private String nickname;
    private String avatar;
    private String ip;
    private String os;
    private String city;
    private String browser;
    private String tokenValue;

    /**
     * 登录时间
     */
    @JsonFormat(pattern = DateConstant.FORMAT_STRING, timezone = DateConstant.GMT_TIMEZONE)
    private LocalDateTime loginTime;

    /**
     * 最近一次操作时间
     */
    @JsonFormat(pattern = DateConstant.FORMAT_STRING, timezone = DateConstant.GMT_TIMEZONE)
    private LocalDateTime lastActivityTime;

}
